<template>
  <div>
    <p>用户名：<input type="text" v-model="form.user"></p>
    <p>密码：<input type="text" v-model="form.password"></p>
    <p>确认密码：<input type="text" v-model="form.password1"></p>
    <p>
      <button @click="reg">注册</button></p>
  </div>
</template>

<script>
export default {
  name: "one",
  data() {
    return {
    form:{}
    }
  },
  methods: {
    reg(){
      this.axios.post('reg/',this.form)
      .then(res=>{
        alert(res.data.msg)
        this.$router.push('two/')
      })
    }
  },
  mounted() {
  }
}
</script>

<style scoped>

</style>
